package com.dc.designPattern._21_strategy.impl;

import com.dc.designPattern._21_strategy.impl.fly.FlyWithSky;

/**
 * Description: 策略模式_红头鸭
 * @author: gdc
 * @date: 2021/6/9
 * @version 1.0
 */
public class RedHeadDuck extends Duck {

    public RedHeadDuck() {
        super();
        super.setFlyingStragety(new FlyWithSky());
    }

    @Override
    public void display() {
        System.out.println("我是红头鸭，头是红色的...");
    }
}
